﻿namespace SchoolSystem.Server.Models
{
    using System;
    using System.Linq;
    using System.Linq.Expressions;
    using System.Runtime.Serialization;
    using SchoolSystem.Data;

    [DataContract(Name = "teacher")]
    public class TeacherModel : PersonModel
    {
        public static Expression<Func<Teacher, TeacherModel>> FromTeacher
        {
            get
            {
                return t => new TeacherModel()
                {
                    FirstName = t.FirstName,
                    MiddleName = t.MiddleName,
                    LastName = t.LastName
                };
            }
        }
    }
}